home *** CD-ROM | disk | FTP | other *** search
/ Publication 19 / Publication_19_19xx_Civitas_de_Side_B.d64 / world conquest (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  10KB  |  334 lines

  1. 10 rem**********************
  2. 20 rem*   world conquest   *
  3. 25 rem*                    *
  4. 30 rem* howard campbell    *
  5. 31 rem* 3463 piper drive   *
  6. 32 rem* northwood, ohio    *
  7. 33 rem* 43619              *
  8. 34 rem* (419) 698-1195     *
  9. 35 rem**********************
  10. 36 :
  11. 50 dimro%(51),cl%(51),sc(51),co%(51),tr%(51),bo%(51,5)
  12. 60 r=rnd(-ti):mo=0
  13. 90 print"[147]";:poke53280,0:poke53281,0:poke646,7
  14. 92 gosub6000:gosub9100:fori=1to10:gosub9500:nexti:gosub30000:gosub30000
  15. 93 print"instructions? y or n"
  16. 94 geta$:ifa$=""then94
  17. 98 ifa$="y"thengosub20000
  18. 99 print"[147]";:goto 2000
  19. 100 remcomputer's selection of poa
  20. 105 p1=1:p2=0:co=2
  21. 108 la=at:f=0
  22. 110 b1=1:e1=50:s1=1:r=rnd(.):ifr>.5thene1=25
  23. 115 r=rnd(.):ifr>.5thenb1=50:e1=1:s1=-1:r=rnd(.):ifr>.5thenb1=25
  24. 120 k=0:l=0:fori=b1toe1steps1:r=rnd(.)
  25. 130 ifco%(i)<>2then150
  26. 140 ifr>.3thenk=1:ba=i:i=e1
  27. 150 nexti
  28. 151 ifco%(la)=2andf=0thenba=la:k=1:goto160
  29. 152 ifco%(la-(la<50))=2andf=0thenk=1:ba=la+1:goto160
  30. 153 ifco%(la-(la>1))=2andf=0thenk=1:ba=la-1:goto160
  31. 160 f=1:forj=1to4
  32. 165 ifco%(bo%(ba,j))=7thenat=bo%(ba,j):l=1
  33. 169 nextj:ifk=0orl=0then110
  34. 172 print"";:printspc(33)"base   [157][157][157]"ba
  35. 173 print"";:printspc(33)"       "
  36. 180 r=int(rnd(.)*2+1):iftr%(ba)<=2thenr=1
  37. 182 iftr%(ba)>=tr%(at)thenr=2
  38. 185 on r gosub200,300
  39. 190 return
  40. 200 remcomputer troop build-up
  41. 205 print"";:printspc(33)"deploy"
  42. 210 tp=int(te%(p1)*.2):iftp<5thentp=5
  43. 220 tr%(ba)=tr%(ba)+tp
  44. 230 gosub560
  45. 240 return
  46. 300 remattack mode
  47. 302 print"";:printspc(33)"att."at
  48. 310 sa=int(tr%(ba)*.2+.5)
  49. 320 ca%(0)=int(rnd(.)*3):ca%(1)=int(rnd(.)*3)
  50. 325 gosub9000
  51. 330 tr%(ba)=tr%(ba)-ca%(1):iftr%(ba)<=1thentr%(ba)=1:win=1
  52. 340 tr%(at)=tr%(at)-ca%(0):iftr%(at)<=0thengosub400:return
  53. 350 iftr%(ba)>saandp1=1then320
  54. 360 gosub500:return
  55. 400 remoccupation
  56. 410 tr%(at)=int(tr%(ba)*.5):tr%(ba)=tr%(ba)-tr%(at)
  57. 420 p=sc(at):pokep,co:pokep+1,co:pokep+2,co:pokep+3,co:pokep+40,co:pokep+41,co
  58. 430 pokep+42,co:pokep+43,co:pokep+80,co:pokep+81,co:pokep+82,co:pokep+83,co
  59. 435 co%(at)=co
  60. 440 te%(p1)=te%(p1)+1:te%(p2)=te%(p2)-1
  61. 450 gosub500:win=1:return
  62. 500 remposition and print
  63. 510 print"";:sc$=str$(tr%(at))
  64. 515 le=len(sc$):sc$=right$(sc$,le-1)
  65. 520 ifcl%(at)=0then540
  66. 530 fori=1tocl%(at):print"";:next
  67. 540 fori=1toro%(at):print"";:next
  68. 550 print"[150]  [157][157]"sc$
  69. 560 print"";:sc$=str$(tr%(ba))
  70. 565 le=len(sc$):sc$=right$(sc$,le-1)
  71. 570 ifcl%(ba)=0then580
  72. 575 fori=1tocl%(ba):print"";:next
  73. 580 fori=1toro%(ba):print"";:next
  74. 590 print"[150]  [157][157]"sc$
  75. 595 return
  76. 1000 print"1  [170]2  [170]3  [170]4  [223]"
  77. 1010 print"   [170]   [170]   [170]    "
  78. 1020 print"[175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][175]"
  79. 1030 print"5  [170]6  [170]7  [170]8   "
  80. 1040 print"   [170]   [170]   [170]    "
  81. 1050 print"[175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][175]"
  82. 1060 print"9   "
  83. 1070 print"    "
  84. 1080 print"[175][175][175][175]"
  85. 1090 print"10 [170]11 [170]12 [170]13 [223]"
  86. 1100 print"   [170]   [170]   [170]    "
  87. 1110 print"[175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][175]"
  88. 1120 print"14 [170]15 [170]16 [170]17 [170]26 [170]
  89. 1130 [153]"   +   +   +   +   +
  90. 1140 print"[175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][186]
  91. 1150 [153]"18 +19 +20 +21  "
  92. 1160 [153]"   +   +   +    "
  93. 1170 [153]"andandandsqrandandandsqrandandandsqrandandandand"
  94. 1180 [153]"22 +23 +24 +25  "
  95. 1190 [153]"   +   +   +    "
  96. 1200 [153]"(NULL)andandsqrandandandsqrandandandsqrandandandwaitstep"
  97. 1210 [153]""[166]20)"27 +28 (NULL)"
  98. 1220 [153][166]20)"   +    "
  99. 1230 [153][166]20)"andandandsqrandandandand"
  100. 1240 [153][166]20)"29 +30  "
  101. 1250 [153][166]20)"   +    "
  102. 1260 [153][166]20)"andandandsqrandandandand"
  103. 1270 [153][166]20)"31 +32 +33 (NULL)"
  104. 1280 [153][166]20)"   +   +    "
  105. 1290 [153][166]20)"andandandsqrandandandsqrandandandand"
  106. 1300 [153][166]20)"34 +35 +36  "
  107. 1310 [153][166]20)"   +   +    "
  108. 1320 [153][166]20)"andandandsqrandandandsqrandandandand"
  109. 1330 [153][166]20)"37 +38 +39  45 (NULL)";
  110. 1340 [153][166]20)"   +   +        ";
  111. 1350 [153][166]20)"andandandsqrandandandsqrandandandandandandandand";
  112. 1360 [153][166]20)"40 +41 +42 +43 +44  ";
  113. 1370 [153][166]20)"   +   +   +   +    ";
  114. 1380 [153][166]20)"andandandsqrandandandsqrandandandsqrandandandsqrandandandand";
  115. 1390 [153][166]20)"46 +47 +48 +49 +50  ";
  116. 1400 [153][166]20)"   +   +   +   +    wait";
  117. 1410 [153][166]20)"(NULL)andandsqrandandandsqrandandandsqrandandandsqrandandandwaitstep"
  118. 1411 [153]""[166]28)"print(NULL)lenlenlenlenlenlenlenlenlenlenright$";
  119. 1412 [153][166]28) "peek   world  peek" ;
  120. 1413 [153][166]28) "peek conquest peek" ;
  121. 1414 [153][166]28) "mid$lenlenlenlenlenlenlenlenlenlen(NULL)" ;
  122. 1415 [153]"";:[153][166]32)"contcomputer";:[153][166]34)"moves"
  123. 1420 [142]
  124. 2000 [143]main trunk
  125. 2010 [141]1000
  126. 2030 :
  127. 2040 [141]7000
  128. 2050 [141]100
  129. 2060 [139]te%(1)[178]50 [167] [141]4000:[153]"computer wins":[137]9600
  130. 2070 [141]3000:[141]5000
  131. 2080 [139]te%(0)[178]50 [167][141]4000:[153]"you win":[137]9600
  132. 2090 [137] 2050
  133. 3000 [143]player selection of poa
  134. 3010 [141]4000:co[178]7:p1[178]0:p2[178]1
  135. 3020 [151]198,0:[153]"sysenter playing  position print";:l[178]2:c[178]7:n[178]1:[141]29700
  136. 3022 ba[178][197](a$)
  137. 3030 [139]ba[179]1[176]ba[177]50[167]3000
  138. 3031 [139]co%(ba)[178]2[167]3000
  139. 3040 [141]4000:[153][166]10)"f1wait - attack":[153][166]10)"f3wait - deploy":[151]198,0
  140. 3050 a$[178]"":[161]a$:[139]a$[179][177]"input"[175]a$[179][177]"dim"[167]3050
  141. 3060 a[178][198](a$)[171]132:[145] a [141]3200,210
  142. 3070 [141]4000:[142]
  143. 3200 [143]player attack mode
  144. 3210 [141]4000:[153]"sysenter position of area under attack print";:l[178]2:n[178]1:win[178]0
  145. 3215 [141]29700:at[178][197](a$)
  146. 3220 k[178]0:[129]i[178]1[164]4:[139]at[178]bo%(ba,i)[167]k[178]1
  147. 3230 [130]i:[139]k[178]0[167]3200
  148. 3235 [141]4000
  149. 3240 [141]320:[139]win[178]1[167][142]
  150. 3250 [141]4020:[153]"syscontinue attack? ywait or nwait"
  151. 3260 [161]a$:[139]a$[179][177]"y"[175]a$[179][177]"n"[167]3260
  152. 3270 [139]a$[178]"y"[167]3240
  153. 3275 [141]4000
  154. 3280 [142]
  155. 4000 [143]erase bottom and position print
  156. 4010 [158] 924
  157. 4020 [153]"";:[129]i[178]1[164]22:[153]"";:[130]
  158. 4030 [142]
  159. 5000 mo[178]mo[170]1:[153]"open"mo:[153]"moves":[142]
  160. 6000 [129]i[178]1[164]50:co%(i)[178]7:tr%(i)[178]5:[130]
  161. 6010 te%(0)[178]25:te%(1)[178]25
  162. 6020 [129]i[178]1[164]50
  163. 6030 [135] cl%(i),ro%(i),sc(i)
  164. 6040 [129]j[178]1[164]4:[135]bo%(i,j):[130]
  165. 6050 [130]i
  166. 6055 [129]i[178]960[164]1022:[135]a:[151]i,a:[130]
  167. 6056 [151]2040,15:v[178]53248:[151]v[170]39,10:[151]v[170]28,1:[151]v[170]37,7:[151]v[170]38,0
  168. 6060 [142]
  169. 6070 [131] 0 , 1,55296,0 ,0 ,5 ,2
  170. 6080 [131] 4 , 1,55300,1 ,6 ,3 ,0
  171. 6090 [131] 8 , 1,55304,2 ,7 ,4 ,0
  172. 6100 [131] 12, 1,55308,3 ,8 ,0 ,0
  173. 6110 [131] 0 , 4,55416,0 ,0 ,6 ,1
  174. 6120 [131] 4 , 4,55420,5 ,0 ,7 ,2
  175. 6130 [131] 8 , 4,55424,6 ,9 ,8 ,3
  176. 6140 [131] 12, 4,55428,7 ,9 ,0 ,4
  177. 6150 [131] 10, 7,55546,7,8,12,13
  178. 6160 [131] 0 ,10,55656,0 ,14,11,0
  179. 6170 [131] 4 ,10,55660,10,15,12,0
  180. 6180 [131] 8 ,10,55664,11,16,13,9
  181. 6190 [131] 12,10,55668,12,17,9 ,0
  182. 6200 [131] 0 ,13,55776,0 ,18,15,10
  183. 6210 [131] 4 ,13,55780,14,19,16,11
  184. 6220 [131] 8 ,13,55784,15,20,17,12
  185. 6230 [131] 12,13,55788,16,21,26,13
  186. 6240 [131] 0 ,16,55896,0 ,22,19,14
  187. 6250 [131] 4 ,16,55900,18,23,20,15
  188. 6260 [131] 8 ,16,55904,19,24,21,16
  189. 6270 [131] 12,16,55908,20,25,0 ,17
  190. 6280 [131] 0 ,19,56016,0 ,0 ,23,18
  191. 6290 [131] 4 ,19,56020,22,0 ,24,19
  192. 6300 [131] 8 ,19,56024,23,0 ,25,20
  193. 6310 [131] 12,19,56028,24,0 ,0 ,21
  194. 6320 [131] 16,13,55792,17,0 ,37,0
  195. 6330 [131] 20,1 ,55316,0,29,28,0
  196. 6340 [131] 24,1 ,55320,27,30,0,0
  197. 6350 [131] 20,4 ,55436,0,31,30,27
  198. 6360 [131] 24,4 ,55440,29,32,0,28
  199. 6370 [131] 20,7,55556,0,34,32,29
  200. 6380 [131] 24,7,55560,31,35,33,30
  201. 6390 [131] 28,7,55564,32,36,0,0
  202. 6400 [131] 20,10,55676,0,37,35,31
  203. 6410 [131] 24,10,55680,34,38,36,32
  204. 6420 [131] 28,10,55684,35,39,0,33
  205. 6430 [131] 20,13,55796,26,40,38,34
  206. 6440 [131] 24,13,55800,37,41,39,35
  207. 6450 [131] 28,13,55804,38,42,0,36
  208. 6460 [131] 20,16,55916,0,46,41,37
  209. 6470 [131] 24,16,55920,40,47,42,38
  210. 6480 [131] 28,16,55924,41,48,43,39
  211. 6490 [131] 32,16,55928,42,49,44,0
  212. 6500 [131] 36,16,55932,43,50,0,45
  213. 6510 [131] 36,13,55812,0,44,0,0
  214. 6520 [131] 20,19,56036,0,0,47,40
  215. 6530 [131] 24,19,56040,46,0,48,41
  216. 6540 [131] 28,19,56044,47,0,49,42
  217. 6550 [131] 32,19,56048,48,0,50,43
  218. 6560 [131] 36,19,56052,49,0,0,44
  219. 6570 [131] 0,0,0,24,0,128,0,0,64,1,130,2,128,1,9,96,104,36
  220. 6580 [131] 24,4,144,6,98,64,1,145,0,0,84,0,170,101,85,85,86,170,1,148,0,6,153
  221. 6590 [131]0,24,146,64,96,144,144,128,128,36,0,144,9,0,0,2,0,144,0,0,0,0
  222. 7000 [143]select computer's positions
  223. 7010 [129]i[178]1[164]25
  224. 7020 r[178][181]([187](.)[172]50[170]1)
  225. 7030 [139]co%(r)[178]2[167]7020
  226. 7040 co%(r)[178]2
  227. 7050 p[178]sc(r):[151]p,2:[151]p[170]1,2:[151]p[170]2,2:[151]p[170]3,2:[151]p[170]40,2:[151]p[170]41,2
  228. 7060 [151]p[170]42,2:[151]p[170]43,2:[151]p[170]80,2:[151]p[170]81,2:[151]p[170]82,2:[151]p[170]83,2
  229. 7070 [130]i
  230. 7080 [129]ba[178]1[164]50:[141]560:[130]ba
  231. 7090 [142]
  232. 7091 ba[178]25:at[178]26
  233. 8000 so[178]54272
  234. 8010 [151]so,12:[151]so[170]1,1:[151]so[170]24,15
  235. 8020 [151]so[170]5,15:[151]so[170]6,252:[151]so[170]4,129
  236. 8030 [142]
  237. 8040 so[178]54272
  238. 8050 [151]so[170]7,12:[151]so[170]8,1:[151]so[170]24,15
  239. 8060 [151]so[170]12,15:[151]so[170]13,252:[151]so[170]11,129
  240. 8070 [142]
  241. 9000 y[178]43[170]7.52[172](ro%(at))
  242. 9005 y1[178]43[170]7.52[172](ro%(ba))
  243. 9010 x[178]17[170]7.09[172](cl%(at)[170]3)
  244. 9015 x1[178]17[170]7.09[172](cl%(ba)[170]3)
  245. 9020 [139]x[177]255[167][151]v[170]16,1:x[178]x[171]255
  246. 9025 [139]x1[177]255[167][151]v[170]16,3:x1[178]x1[171]255
  247. 9030 [151]v,x:[151]v[170]1,y:[151]v[170]21,1
  248. 9040 [141]8000:[151]v[170]21,0
  249. 9045 [151]v,x1:[151]v[170]1,y1:[151]v[170]21,1
  250. 9046 [141]8040:[151]v[170]21,0:[151]v[170]16,0
  251. 9049 [151]so[170]4,128:[151]so[170]11,128
  252. 9050 [142]
  253. 9100 [153]"load"
  254. 9105 a$[178]"      sgn   then  (NULL)usr(NULL) (NULL)usr(NULL) fn   (NULL)(NULL)      ":[141]10000:[141]9500
  255. 9110 a$[178]"      sgn peek then  sgn then (NULL)andsqr fn   sgn sgn     ":[141]10000:[141]9500
  256. 9120 a$[178]"      sgn peek then  sgn then sgn(NULL)  fn   sgn sgn     ":[141]10000:[141]9500
  257. 9130 a$[178]"      (NULL)andpeekandsqr  (NULL)andsqr sgn (NULL) (NULL)andand (NULL)(NULL)      ":[141]10000:[141]9500
  258. 9140 a$[178]"                             ":[141]10000
  259. 9150 a$[178]"(NULL)usrusr (NULL)usr(NULL) (NULL)usr(NULL) (NULL)usr(NULL) fn then (NULL)usrusr (NULL)usrusr usr(NULL)usr":[141]10000:[141]9500
  260. 9160 a$[178]"fn   fn then fn then fn then fn then fn   (NULL)    then":[141]10000:[141]9500
  261. 9170 a$[178]"fn   fn then fn then fn then fn then (NULL)usrusr  usr(NULL)  then":[141]10000:[141]9500
  262. 9180 a$[178]"(NULL)andand (NULL)andsqr fn then (NULL)andsqr (NULL)andsqr (NULL)andand andandsqr  then":[141]10000:[141]9500
  263. 9190 a$[178]"              (NULL)              ":[141]10000:[141]9500
  264. 9200 [153]"":a$[178]"written by:":[141]10000:a$[178]"howard campbell ii":[141]10000
  265. 9210 [142]
  266. 9500 [143]random explosions
  267. 9510 x[178][187](.)[172]200[170]50
  268. 9520 y[178][187](.)[172]200[170]50
  269. 9530 x1[178][187](.)[172]200[170]50
  270. 9540 y1[178][187](.)[172]200[170]50
  271. 9550 [141]9020
  272. 9560 [142]
  273. 9600 [129]i[178]1[164]100:[141]9500:[130]i:[128]
  274. 10000 a[178][195](a$):[139]a[173]2[179][177][181](a[173]2)[167]a$[178]" "[170]a$:[137]10000
  275. 10010 [129]i[178]1[164]a[173]2:[153][163]19[171]i);[200](a$,i);[201](a$,i):[153]"on";
  276. 10020 [130]i:[153]:[142]
  277. 20000 [153]"loadprintthe redsprint are intent on world domination.";
  278. 20010 [153]"you are the commander of the sysyellowprint    "
  279. 20020 [153]"army whose mission is to keep your     "
  280. 20030 [153]"world free by defeating the  red army  "
  281. 20040 [153]"in all of the states on your world's   "
  282. 20050 [153]"three continents.                      "
  283. 20060 [153]"each turn you are given the option of  "
  284. 20070 [153]"attacking the red army on a direct front";
  285. 20080 [153]"or building up your troops in a given  "
  286. 20090 [153]"state.                                 "
  287. 20100 [153]"if you choose to attack the enemy you  "
  288. 20110 [153]"must have over 1 troop in the attacking"
  289. 20120 [153]"front. if you win, the state will turn "
  290. 20130 [153]"to your color.                         "
  291. 20132 [153]"the number of troops is given in defpinkprint "
  292. 20134 [153]"in the  center of each state. the number";
  293. 20138 [153]"of the state is  in  the upper left    "
  294. 20139 [153]"corner.                                "
  295. 20140 [153]"beware!! the enemy commander is clever "
  296. 20150 [153]"and shows no mercy!!! he may attack you"
  297. 20160 [153]"or build up  troops to carry out his   "
  298. 20170 [153]"own plan to defeat your armies.        "
  299. 20180 [153]"good luck!!!                           "
  300. 20200 [153][166]8)"syspress <space> to continue"
  301. 20210 [161]a$:[139]a$[178]""[167] 20210
  302. 20220 [142]
  303. 29700 [151]251,l : [143]input length
  304. 29710 a$[178]"" : [143]initialize
  305. 29720 [158]828 : [143]activate irq wedge
  306. 29730 [151]646,c : [143]set input color
  307. 29740 [159]1,0:[132]1,a$:[160]1
  308. 29750 [139]a$[178]""[167]29040
  309. 29755 f[178]0
  310. 29760 [129]i[178]1[164][195](a$) : [143]check numeric input
  311. 29770 [139]n[178]1[167][139][198]([202](a$,i))[179]48[176][198]([202](a$,i))[177]57[167]f[178]1
  312. 29780 [130]i
  313. 29785 [139]f[178]1[167]29740
  314. 29790 [158] 911 : [143]deactivate irq wedge
  315. 29800 [142]
  316. 30000 [135]l :[143]start position of ml routine
  317. 30010 [135]a$:[139]a$[178]"*"[167][142]
  318. 30020 [143]convert hexadecimal to decimal
  319. 30030 a[178][198](a$)[171]48:b[178][198]([201](a$,1))[171]48
  320. 30040 n[178]b[170]7[172](b[177]9)[170](16[172](a[170]7[172](a[177]9)))
  321. 30050 [151]l,n:l[178]l[170]1:[137]30010
  322. 30060 [131]828
  323. 30070 [131]38,20,f0,ff,86,fd,84,fe,18,a5,fe,65,fb,85,fc,a6,fb,a9,11,20,d2,ff
  324. 30080 [131]a9,b7,20,d2,ff,ca,d0,fa,20,86,03
  325. 30090 [131]78,a9,6a,8d,14,03,a9,03,8d,15,03,58,60
  326. 30100 [131]38,20,f0,ff,c4,fc,90,03,20,86,03,c4,fe,b0,03,20,86,03,e4,fd,f0,03
  327. 30110 [131]20,86,03,4c,31,ea,18,a6,fd,a4,fe,20,f0,ff,60
  328. 30120 [131]78,a9,31,8d,14,03,a9,ea,8d,15,03,58,60,*
  329. 30130 [131] 924
  330. 30140 [131] a0,50,a9,20,99,6f,07,88,d0,fa,60,*
  331. 60000 [129]i[178]2048[164][194](45)[170][194](46)[172]256
  332. 60010 [139][194](i)[178]143[175][194](i[170]1)[178]32[167][151]i[170]1,18
  333. 60020 [130]
  334.